//
//  DMOrderManager.m
//  DMPolymerizeSDK
//
//  Created by YeJary on 2025/4/29.
//

#import "DMOrderManager.h"
// #import "WDAPIService.h" // 文件不存在，已移除
#import "DMInAppPurchaseManager.h"
#import "../../Utils/Logger/IMLogUtils.h"

@interface DMOrderManager()

@end

@implementation DMOrderManager

+ (instancetype)sharedManager {
    static DMOrderManager *instance;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [[DMOrderManager alloc] init];
    });
    return instance;
}

- (void)startPurchaseWithProductId:(NSString *)productId
{
    if (!productId || productId.length == 0) {
        [IMLogUtils info:IMLogTagIAP format:@"🛒 [IAP] Product ID cannot be empty - 商品ID为空，无法启动购买"];
        return;
    }
    
    [[DMInAppPurchaseManager shareInAppPurchaseManager] launchInAppPurchase:productId];
}


@end
